import {  AxiosError } from "axios"

export interface Options{
    url:string
    headers?:{}
    params?:{} | null
    others?:any
}

export interface Response<T>{
    code:number
    message:string
    data:T
}

export interface ResponseError<T=unknown,D=any> extends AxiosError<T,D>{
    hiddenDefaultErrorHandler():void
}

export type AxiosBaseConfig = {
    baseURL:string;
    timeout?:number;
    successNetworkCode?:number;
    authInvalidCode?:number;
    authTokenName?:string;
    messageName?:string;
    dataName?:string;
    headders?:any;
    authFailed:() => void;
    [key:string]:any;

}